import request from '@/utils/request'

import type { Response } from '@/utils/type'

// 获取项目列表数据
export function getProjectList(data: any):Promise<Response<any>> {
  return request({
    url: '/screen/indexScreenDesign/query',
    method: 'get',
    params: data
  })
}

// 创建项目
export function addOrUpdateProject(data: any):Promise<Response<any>> {
  return request({
    url: '/screen/indexScreenDesign/addOrUpdate',
    method: 'post',
    data
  })
}


// 删除项目
export function deleteProject(data: any):Promise<Response<any>> {
  return request({
    url: `/screen/indexScreenDesign/delete`,
    method: 'post',
    params: data
  })
}

// 获取项目详情
export function getProjectDetail(id: string):Promise<Response<any>> {
  return request({
    url: `/screen/indexScreenDesign/get?pkid=${id}`,
    method: 'get'
  })
}


// 获取模板列表数据
export function getTemplateList(data: any):Promise<Response<any>> {
  return request({
    url: '/screen/indexScreenDesignTemplate/query',
    method: 'get',
    params: data
  })
}